package com.summba.analysis;

import java.io.BufferedReader;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

import com.summba.common.Common;

public class CheckClassFeature {
	private String path = "";
	private String wPath = "";
	private Set<String> cfSet = new HashSet<String>();
	
	public CheckClassFeature(String cfFile,String writeFile){
		path = cfFile;
		wPath = writeFile;
		loadFile();
	}
	
	private  void loadFile(){
		BufferedReader br = Common.getFileInfo(path);
		List<String> tempList = Common.bufferedReaderToList(br);
		cfSet.addAll(tempList);
	}
	
	
	public void showSet(){
		for (Iterator<String> iterator = cfSet.iterator(); iterator.hasNext();) {
			String type = (String) iterator.next();
			System.out.println(type);
			
		}
		Common.appendFile(wPath, cfSet);
		System.out.println("Size is: "+cfSet.size());
	}
	
	

}
